refactored parsing to remove explicit statement of segment type, removed dead code