added tab switches. fixed coloring issues. added some unit tests