removed unused Javascript functions