Move objective checking into another class to prevent issues.