Refactor and robustness
Created by: MitchellWT
This MR does the following:
- Does some major refactoring using composition for commonality.
- Renamed vars to more appropriate/descriptive names.
- Made matchFileName less fragile (no longer relies on order of tracks).