I want to run jshint on this code, and to refactor it and change it spaces, to be less hacky :)

What do you think?