General code cleanup

I did a few things here, namely:
- Got rid of some unnecessary semi-colons and added some where they were needed
- Got rid of some unused variables
- Sorted out an indentation issue
- Ensuring that strict equality is used everywhere when comparing with booleans, as is the convention throughout the repository

I hope this is helpful.