Tidied up Transaction class (formatted and added comments).