Merge pull request #4 from opengm/master

getting updates from master repo
minor refactoring
Merge branch 'master' of https://github.com/homul/opengm
commenting out debug output
Merge pull request #245 from homul/master

TRWS called fixed