shell factory
reorganized and discarded cui for now
functioning moc
opening new db files work without leak