added semicolons and dot notation as recommended by jshint