Updated db scheme and more constatnts