Implemented segment storage and unit tests for it classes