adds missing semicolons to vars, removes unused params