Added some tests and changed some attributes to transient