Added new logic of selling packs. Minor fixes.