Added support for segmentation (through ID) and cleaned up the logging from the reqeusts library