Remove nonsense instance pattern

If it was called multiple times, it wouldn't really help much to
explicitly delete the old object. These really should only be
called once.

For some reason this is upsetting pyflakes too.
Remove bits of unused code
Don't shadow uuid import
Use xkl unconditionally

It's available in distros now.
Fix typo in variable name
Fix undefined variable
Fix various undefined variables
Run pyflakes on make check
Merge pull request #42 from dnarvaez/pyflakes

Make the code pyflakes clean