refactoring cool middleware .net