Segments working, added load and save transformation functions