Restructure work with database: instead static dbService comes singleton instance; tag handling modified
Restructure work with database: user handling modified
Restructure work with database: resource-tag relation handling modified
Restructure work with database: resource handling modified; dbService modified
Some error fixed