Ben/Roberto: Moved JavaScript out of the home view into a file