refs #31 - cleaned up, commented and added resign function to backend thread