Xavier/bits and pieces

I broke git somehow. Remaking this pull request