Added sanityCheck(), additional geometry tests, and tested widths[], heights[]