Merge pull request #185 from dirkmueller/saschpe_bugfixes

Refactorings in preparation for Multi-backend
Fix syntax error

Not sure why I didn't find this in previous testing :/