Added a color class and enabled alpha blending, and changed the structure in the main loop