cleaned up some code, indents