Relocation fixes.
These changes implement a suitable relocation output in the image. The code is still not working 100% but these changes are a big improvement.