Add tests

	- Refactor code
	- Make sure error tracking is disabled by default
	- Test enabling error tracking using `enableErrorTracking()`