Refactoring dimension calculation and removing references to bellows