Adds main implementation and docs.