finish layout and routes.