[fix] Adding some basic fixes
[minor] Adding middleware support