Adds goal detection.
Resolves conflict.