Set limits on resizing to ensure no breakage

Addresses problems with resizing things too small/too far.