Fixed some ids to classes and fixed bugs in the javascript