Moving to ErpM applicative and monads
This code is not in a stable state