adds model tests, refactors dashboard and adds controller tests