Add tests for rectangle and near. Tweak Shape and add some docs.