cleaned up view and initialized view variables