Access to parent and some refactoring