Code refactoring to reduce logic paths.