Refactored node composition => inheritance to improve performance