Changes to CompositeLayer after code review, fixed logic error in inputs_to_layers dictionary inversion