Improvement in visibility and small refactoring