Feature/recog

Cherry-picked some stuff I apparently never PR'd from a month ago.  =/