Completed DBLayout and model code.

Requires review especially to ensure all fields and relationships are captured and corresponding methods created.