changed nchar to nvarchar, fixed bug in AccountType cast, fixed unit tests