Refactored out hard coded segments and replaced them with the actual segments.