Added view reference and fixed child inheritance