minor fixes, starting to add support for separate data directory