Code now picks up the centre point of the container programmatically.