Cleaned up comments and removed unused variables