Build histogram classes