finish layout and rooutes