Simplified the lookout function to be a bit DRYer.