Add some functions and bind them to javascript.