Full implementation

Seemingly, everything works.