refactor db and tests to CRUD
add notes to client.rb