Added Tilesheet implementation for HTML5 compat, and made changes to make everything work with Flash