Cleanup. Still very much WIP

There seems to be another issue with WeeChat or something