Further cleanup - collapse it all into one if statement, drop the helper