Moved utils into the ast module since that was the only thing using it. Made some minor cleanup and perf optimization.