Toolkit refactoring
XML bug fix