Removes unecessary javascript and resources