Refactored for new package system