WIP: Replace old API Connection with new API Client library

In this series of commits I have made several changes to accommodate for the new Client and I possibly committed a sin or crime by adding dependency injection into the project.