Star 0.7-dev, Code cleanup and optimization with structural change