changes to legal_configuration and more tests