Hintify the code

Mostly removes unused variables and adds missing semicolons