Semicolon fixes
Remove unused variables, fixed inadvertent globals, and initialize members to null.