model mapping and fix view tests