API calls and routing now working