Refactoring, handling token expiration, etc.