Revert "remove setup code (bug 936680)"

This reverts commit 251e10a3d0d18d113da4c13cf60f5e92f1fe5dcb.