Added segmentation and interrupt handling