Refactor static histogram model and widget