Refactor code & moved all npm modules to separate role