refactor into a container bootstrap method; fix spec