Setting up routing and utility functions