Fix syntax error and stray lines of code