adds middleware and route organization