adds routing and map directive