Adding utils class (incl. measurement guesser), simplifying logic, adding tests.