Added ViewContract and contract framework.

@bsoetaer