more unit tests
more unit tests, removing global registry of deffunctions and replacing with module level registry