fixed grammar conflicts
added tests + some formulas improvements