correcting JS includes and deleting a redundant setTimeout()