Refacto/rename branch and add file

Same solution as #663 but without the static struct.

What is the better?