Refactoring. Initial setup to allow Xephyr to work