Refactoring - second try

It was introduced by error. Fixed.