Move some code around, and start writing doc

Starting with overview.html.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>