changed transaction model and tests because type is an effing reserved word
changed transaction model and tests because type is an effing reserved word