Add the (options) procedure + docs. Some internal tweaks / clean-ups.
Some basic unit tests. More will follow.