Updated Option usage in modes.rs