Refactoring to support conneg in OnError pipeline
(Hopefully) Fixed mono build error