Refactor: Javascript parent.parent