Multiple changes

See commit log for full details.

Added several new options.