Cleanup and adding 256 color support