Refactor layouting view method