Clean up and optimisation of DAO class