Fixed retrieving references to get all remotes and their branches. Added state to repository. Added auto-refresh of state