made classes serializable, fixed Transaction class