Support v0.12, and refactoring