Game engine rewrite in HTML5 canvas fixes #1