Refactored X3Core to remove unnecessary code.