Refactor sos package.