Refactors code and changes color scheme