Housekeeping. Moving cube creation into a geometry builder module.
Renamed some global variables.
Moving input handler code into another module.