Replaced ajax with Couch call for data.