Remove unused code and add missing semicolon