made the code more readable

Made the code more readable, used the free service provided by http://www.javascriptbeautifier.com/