Improve option handling