Restructured program structure as per MEAN stack of scotch