add externalTemplate binding handler
refactor/harden newCake unit tests