painful app package refactor