PRogress on #49

Still needed: tests

and a better GetErrorAndWarnings