Optimized rendering of the Graphics buffer, and fixed a bug where input events were repeated. Closed #2