Better namespace handling and a bug fix for interface handling.