Minor rearranging

Moved all definitions to the top, followed by all supplementary
functions, followed by all big-bang functions (draw, on-key, etc.)