Basic game engine skeleton.

Includes re-organization of client JavaScript.