Refactor client dao