moved remaning js in from home page in to js file