Cleaned up some GUI code, and fixed something in spritesheet.
Added a function to get bitmapdata from source.