Squashing bugs, rewriting complex code