Added basic middleware skeleton