Goal timeout added. Did some refactoring with the main and findball functions.