Program containing all the sailing logic.