fix to strict errors and removed middleware interface