Work on #42, #43 before #44.
Move files into dirs for preparation for #44
Resolve #42, resolve #43, resolve #44
Made the whole thing much more generic and possible for other users to use.
Resolve #41, made opening dbs work better.