Refactored classes to xd namesapce