Improve readability
Clean up logic in dimensions
More tests of power and mpower
Better check of dimensions