separated db methods from app. created structures and a config file.