Add histogram model, change data structure in layer model