Updated code for tracking remote branches