Added tower segmentation code. More changes to follow.