Updated for new tables and column types