Removed pseudocode segments due to '\xe2' error. Rewrote segment into segment_file(). Almost functional