add back code that was mistakenly removed
use trunk scm by default. misc cleanup