Initial commit of JS functions