refactor xinfo and constants