Improve option processing