Cleaned up code(renamed functions and removed some useless comments)

Added rename.