Denorm revisions

fixing one table, adding one table, updating one function