added --consolidate-layout, bounds-related calculations