Contains all utility method used by Xanot to do its job.