split asgard.js into asgard.js and asgard_api.js