added return statement for proper chaining, some minor changes
fixed option processing
Merge pull request #2 from husa/master

added return statement for proper chaining