Clean up for js-functions