Api and models improvement

Migration: yes
....
ditto