Changed way Xhat was built