1) deleted caseFactory
2) DataBase singleton
3) minor fixes and clean