Rc2.1

- commits of "old" pull request
- merged dualdec. changes
- merged pep8 from amueller
- fixed some bugs pointed out by amueller