added comments and fixed bug in code that affected which part of the msg was being published
changed subscriber python code to a class with thread protected messages