centralize IDL stuff into a .js file