fixed color scheme
refactored some code