Added Matrix and Tool classes