Cleanup:
 - removed unused variables
 - simplified the access to the ApiManager