Documented code

Added tons of documentation.

Moved ColorModes enumeration to a separate file.