view creation and clean up