Redesig to fit in with new middleware structure