Beginning of work on ORM. Finally got this metaprogramming stuff sorted out.