fixes #664 Move txn complete hooks to their own file