Add measure mode and minor refactoring