For the most part this was semicolon fixes, but there was a function, `calledMethod`, which did need to be moved out of the loop.