clean up javascript and add jquery mobile