Split DB stuff out.