Added Counter Measurement.
Small code refactoring.
close #5