Changes several match-statements with a single branch to simple if-statements.  Removes several unnecessary type declarations on variables.