Added relationships between tables and updated views