Moved keyboard control away from the main file.
Cleaned the Mesh api for drawing.