Add dimensions, dimension contracts and some functions for measures
add contract tests