adding dajaxice for ajax calls and cleaning up js