This patch moves the further reusable parts of the terminal into public header files. It also slightly tweaks the color table to give all colors a similar brightness level.