reformatted code
moved claculation of native function hash from NativeFunction constructor to NativeFunctionFactory
added optionalParameter(), requiredParameter() factory methods