Break actions up into functions to give the GC a chance to act