Fixed some bugs related to option processing.
Make client methods static where possible.