Functioning APIs. Need more error handling