Removed crashing line, and added utility class Color to deal with RGB
Some refactoring, and added a empty event handler.