Added mouse button support for X.
Currently only supporting left right middle and scroll wheel.
Few tidy up things around the code too.