Betadev

Thu needs some of these changes.