WIP removing duplication by creating measurement class
WIP removing duplication
Making changes based on recommendations by Intellij > Analyze > Inspect Code
Reformatting project