Finished, Added DOM manipulation into error checking