Migration from AccountEntry to Transaction. Change test and fixed some bugs