Removed obsolete code and added X11