Fix tests and re-add methods used for testing.