Added referential constrants. Removed most alaising/schemas. Added AutoQuery. Shit is baus.