Modifications to database handling & setup