First cut of the foundation classes

Fundamental structure done but relationships have race condition.