Caches viewport dimensions to minimize dom reads. Changed `current` method to return first matching vp instead of last. Fixed shim that checks for which dom prop to read. Added more comments.