Complete potato api and basic tests