refactored the api.  introduced cmd and query beans