Add criteria tools
Merge pull request #223 from mzry1992/refactor-db-layer

Add criteria tools