updated for new InterfaceSDK functionality, fixed several threading isues
made indents consistent