Fixed pio tests
Merge branch 'refactor-pio' into refactor_API