Add random hash to preloaded img's src to avoid cache.
Gray dimension fields out when an image is loaded. Smarter initial dimensions detection.
Some ratio locking.
Removed obsolete, commented-out code.