[CHG] review, refactor package service source code