cleaned up whitespace and other code formatting