Optimize code and update gradle plugin' version to 0.10.