Enhance code and interface, working diff