Updated some libraries.
Refactoring for better readability.