Reformatted code, made test of whether a rectangle contains its own vertex, pass