Refactor package app