Refactored basic model. Refactored pack-unpack