api.bit: new implementation
api.registerStaticConstants: set some other constants too. not sure what actually sets them