more options
set endpoint based on test mode,  and other options
endpoint is not needed
moved pwd to own path, added correct names for services