Object recognition logic

Please review @matthewsibigtroth