Chain functionality changed

- Middleware will be inserted at the beginning of the stack, when
pushed, this will make the applications be able to run their middleware
when added instead of waiting for the parent app middleware
- Middleware is removed from the context once finished