Refactored: public area and private area now share the same code. Close #117