Change the structure

Try to put the more general function at the root
Add pictures as examples