Changes to fix import errors for api when running on external web server.