refactor home css and javascript