code cleanup, and support for sublevel with regular level dbs