measurement and visualization refactoring