First pass at working build model!!!

This still needs some fixes (see TODOs in MBM.py and elsewhere)

Misc small fixes in various modules.

Yay!!!