Added no-db option and fixes