decoupled database middleware
cleanup of old code/files
fix old require statement