Added check for X11
Renamed some methods