Moved common option set code.
Slight cleanup.
Refined tests. Added name as parameter to OptionSet.