indentation, cleanup

removed console.log lines, did some indentation to make the code more
readable.