Cleaned up compiler warnings.
Implemented Xselect