Moved configuration and class loading to their own class and added some more error handling to sendData