Condtitions instead of feature switch

Unfortunately given/when is marked as experimental in perl 5.6.0 (warnings) so i had to change few switches to if/elsif/else conditions.