Fixed some indentation, deleted dead code, etc