Cleanup
Added detection of mid-size images