refactored test initialization. using CORS by default if running from file system