Added contract classes and db helper