Updated API and tests