Refactor storing packages