Doc and spec

Will probably not compile yet (tex)