Removed unused variables, commented out code, and old TODO