Refactor tracker api