Created 2 more tables and fixed code that were table dependent