Refactory controller and view code

to seperate from master and child
Fix bug-------master,child use different layout and header