Move code that calculates X to new function
Added building image
New test images added.