Refactor package setup