General cleanup

Fixed a few syntax issues and removed a few unnecessary variable assignments.