Cleaned up source dir and pulled common logic out of extensions

I'm not sold on the function attached to XM.Model, but I think it'll be
fairly useful accross the board.
Cleaned up how I saved the sock reference
Merge branch 'websockets'
Merge branch 'import_core_kinds'