fixed syntax errors, deleted deadcode, and whitespace