Added JS Objects definitions and some utility functions.