Moving functionality to transaction class.