moved controller code doublication and added initial identity package