ReFormatting and adding scaling

I re formatting parts of the source file with addition of creating text
function. I also added a scaling function which will allow the game to
scale the window from the swf.