refactored modulus runtime to be a function rather than just an object. makes a more powerful api.