Changed according to review

Simplified the code which handles finding the auto-height data.