remove middleware folder
refactoring