move command and query dispathers to an infrastructure layer