Created segment class with basic functionality