Refactor for stability
Merge branch '1.x'