move view code out of window