Added color and gradient generator. Minor refactoring.