#28 - Improve automated tracking component

* Next round of refactoring.
* Added unit tests.