Checked for errors

Checked for errors and linked to the js file.