Added needed calls to allow threading with PyGTK. Other small fixes.