fixes error formatting
Removes console.log, fixes acceptance test
Fixes middleware parsing errors