move score and max value to the cube side
fix some small bugs