Put demo routing in separate function.