Worked a bit more on the ORM code

Added source manager to simplify sending info back and forth through the
system.
Added various parameter types.
Added a number of unit tests.