Moved calling code to calling.js