hrparser: fixed bug concerning choosing the wrong clocks
converter: refactored code to be more logical and compact