Error messages & test/build fixes