Initial implementation

Initial push of the first implementation. Works as described on my
machine. Who knows if it works anywhere else.