Refactored client API calls, removed unneeded dependencies, made other small improvements