Merge Jan's changes and preliminary version of CreateDB.