Fix #197.
Fix #201.
Fix #202.
Fix #204.
Fix #205.
Fix #206.
Fix #203.
Fix #208.
Revise Flyweight.
merge with upstream
merge with master