Moved homepage JS to a separate file