Refactor xorg module

Change-Id: I3f023a703b41d7dd7a7d23252a8f89778f16293b