Refactory of view