some work removing database calls from the code. trying to move all database calls to centralised objects so we can eventually maybe drop database usage altogether.