daily commit

Some changes in data model and changes in logic at db layer:
- db packages were refactored, common methods moved to basic package;
- conditional commit method was changed, added commit on load switch
- changed some error codes
- rewrote logic for data transformation