Refactoring and first pass at the meter