Added AbstractDao and minor improvements.