Addresses changes discussed in Pull Request #39.

See the commit message on 819717262963bed8b150a05d0eae34b057778c37 for a summary of the most important changes since Pull Request #39. See also #38. Mostly has to do with maintaining the new flexibility while simplifying the code (reducing branches) and API (consolidating configuration options), which in this case are really the same thing.