fixed default rep id and moved STATES constant to appCtrl Scope