Adding routes and domain functions