Db Update and minor fixes on the API.