Refactoring Node and worker

Middleware Updates