Refactoring machine data app