Cleaned up comments and unused functions