Many many4

Merging in current master, and some additional bug fixes to enabling the connection of association tables to type tables.