More command, database work, fixes