Code fixing. Conforms to UML

Please test.