Refactor package storage