feat(client): refactor api and stuff