Updated the code conform the last refactoring