cleanup and name fixing around authorization code