Unfatalize warnings cleanly

This implements the import methods in a much more clean way. It also deals with warnings in the test suite.