getting things up to date, fixed bugs in the unwrapping and improved displacement calc