removed js functions from global scope