DB routing and minor cleanup