Restructure if blocks.