Begin rewrite for new API