Fix all tests and rebase conflicts

This rebases the lockfile branch to master and updates all code necessary to get
the tests passing again.