Remove extraneous lines; correct parentheses and missing semicolon