Updated some database calls and changed abstract base to trait for easy reuse
Overhauled some tests