Fixed a crash and the tabs-pressed color.

Also removed some junk code and a library that isn't used.