Port API to tasty framework

Rebased old branch on the top of the current work.