Added contract functionality and validators