Continuing refactoring

* Merge from dev
* Misc. fixes to ProfileClient
* Added unit tests for ProfileClient
* Added mocks
Return the removed account and `WriteObject(account)` instead of true