Better namespace use, minor changes