Adding more tests, plus a rename of lessThan to elementBefore; greaterThan to elementAfter and bugfix so the new code works - LANG-551