replaced tokenizer with regex, added log ln abs, fixed other stuff