Convert tabs to spaces
Use a closure
Remove commented out code
Minor whitespace cleanup