Cleaning up some ugly code styles. JSLint would be ashamed.