Improve and simplify CLI matcher classifier code