Send conditional GET for registry
Move some code around to organize it better