[jmdb] Refactoring to more like command query separation
[jmdb] Cleaning up the email repo