removing all unneccessary javascript calls