Merge pull request #702 from wmathurin/unstable

Misc refactoring