Start rewrite for new API