Move database stuff into new class osiam::database