rearchitecture of the angular scripts, and unit tests structure