Added proper management of subviews.