Starting to add support for open-source controller (and other bug fixes)

Requires latest test_framework.