Refactoring the code and retrieve the Docker Hub information