Working binary matrix class