Moved geometry hints code down, to reduce code complexity