I ended up spending the last few hours trying to get it to work in html5 (without success) rather than polishing things up a bit. I'll see if I can manage fullscreen or scaling on my next project though.