Minor refactoring
Added test on figures
wip..