fixed issue #31
some refactoring
added settings proto and db files