Fixed database helper
made function protected after usage by other mapper
Removed unused code