cleanup some old code
more cleanups
better handling of access and reset token expiration
minor cleanups