cleaned up comments, logic, and todos