Resize optimization and fewer recalcs

Took some functions out of the loop.
Comment clarification