refactor code and add javadoc.
Fixed a problem that is not possible to set comments for color settings.