Added macro for nif stubs.
Added documentation and specs.