add ability to set min token length + fixes