Optimized DimensionHelper class. The class has much less code, and contains static methods only.