Improve Code Quality

Improve code quality from **3.19** to **4.0**

* Remove code duplications
* Refactor complex methods

https://codeclimate.com/github/EdgarOrtegaRamirez/useragent/compare/refactor