Refactor, add decorator

Refactored for speed
Added @track("path") decorator. Doesn't wait for the request to complete
to execute the decorated function