Removing extra spaces
Changing how the formatting of self.user_agent is done to be simpler.