Good job on separating out the parts of your js with relevant comments. In the future, please also namespace your code.