Fixed bugs regarding color detection. Added comments
Bug fixes