Updated formatting of code to be more readable