First implementation

It needs a lot of cleaning