Atrack protocol code cleanup