fixed a bunch of errors got it bat working again. Still need to fix getting the URL from the config