Major refactoring of measurement, etc.
Measurement update
Added error output
Merge pull request #10 from vhordejcuk/master

MOOORE!