Refactor of measuring classes