Clean up some code and add enable voice matching option.