Updated most tables with foreign keys, added trigger on listings table