Js components rearrangement

This task is almost done. We should do the integrated test.