messy commit, but this is the current version of doubango, or at least the one that will be used in the upcoming version.  will do a better merge
 in the trunk branch