Fix wrong accesses to Dimensions classes

 - change &obj to obj.getPointer()
 - reduce line lengths to about 80