added CMS part II forgot git add, also changed middleware to add trailing slash