Make peer verification work a bit better

Also fix picture scaling by picking either width or height to scale by.