Changed logging to use SDL. Added function to make it easier to use sendCommand. Moved around init a bit