Merging of some of Mike's fork and addition of my main script (dbbdt).