Updated API and routes