Cleaning up if/elseif/else