Cleaned up code.
Vertical and horizontal images are now constrained into equal sized
thumbnails.