complete js migration, move map_values functionality into new User factory