Move code not necessary to transaction out