Improved option handling