diff --git a/include/ui/mat4.h b/include/ui/mat4.h
index 08a67c7..d9647cc 100644
--- a/include/ui/mat4.h
+++ b/include/ui/mat4.h
@@ -33,7 +33,11 @@
 
 template <typename T>
 class tmat44 :  public TVecUnaryOperators<tmat44, T>,
-                public TVecComparisonOperators<tmat44, T>
+                public TVecComparisonOperators<tmat44, T>,
+                public TVecAddOperators<tmat44, T>,
+                public TMatProductOperators<tmat44, T>,
+                public TMatSquareFunctions<tmat44, T>,
+                public TMatDebug<tmat44, T>
 {
 public:
     enum no_init { NO_INIT };
@@ -108,6 +112,17 @@
     template <typename A, typename B, typename C, typename D>
     tmat44(const tvec4<A>& v0, const tvec4<B>& v1, const tvec4<C>& v2, const tvec4<D>& v3);
 
+    // construct from 16 scalars
+    template <
+        typename A, typename B, typename C, typename D,
+        typename E, typename F, typename G, typename H,
+        typename I, typename J, typename K, typename L,
+        typename M, typename N, typename O, typename P>
+    tmat44( A m00, B m01, C m02, D m03,
+            E m10, F m11, G m12, H m13,
+            I m20, J m21, K m22, L m23,
+            M m30, N m31, O m32, P m33);
+
     // construct from a C array
     template <typename U>
     explicit tmat44(U const* rawArray);
@@ -131,33 +146,6 @@
 
     template <typename A, typename B>
     static tmat44 rotate(A radian, const tvec3<B>& about);
-
-
-    /*
-     * Compound assignment arithmetic operators
-     */
-
-    // add another matrix of the same size
-    template <typename U>
-    tmat44& operator += (const tmat44<U>& v);
-
-    // subtract another matrix of the same size
-    template <typename U>
-    tmat44& operator -= (const tmat44<U>& v);
-
-    // multiply by a scalar
-    template <typename U>
-    tmat44& operator *= (U v);
-
-    // divide by a scalar
-    template <typename U>
-    tmat44& operator /= (U v);
-
-    /*
-     * debugging
-     */
-
-    String8 asString() const;
 };
 
 // ----------------------------------------------------------------------------------------
@@ -195,6 +183,23 @@
     mValue[3] = col_type(0,0,0,v.w);
 }
 
+// construct from 16 scalars
+template<typename T>
+template <
+    typename A, typename B, typename C, typename D,
+    typename E, typename F, typename G, typename H,
+    typename I, typename J, typename K, typename L,
+    typename M, typename N, typename O, typename P>
+tmat44<T>::tmat44(  A m00, B m01, C m02, D m03,
+                    E m10, F m11, G m12, H m13,
+                    I m20, J m21, K m22, L m23,
+                    M m30, N m31, O m32, P m33) {
+    mValue[0] = col_type(m00, m01, m02, m03);
+    mValue[1] = col_type(m10, m11, m12, m13);
+    mValue[2] = col_type(m20, m21, m22, m23);
+    mValue[3] = col_type(m30, m31, m32, m33);
+}
+
 template <typename T>
 template <typename U>
 tmat44<T>::tmat44(const tmat44<U>& rhs) {
@@ -320,42 +325,6 @@
 }
 
 // ----------------------------------------------------------------------------------------
-// Compound assignment arithmetic operators
-// ----------------------------------------------------------------------------------------
-
-template <typename T>
-template <typename U>
-tmat44<T>& tmat44<T>::operator += (const tmat44<U>& v) {
-    for (size_t r=0 ; r<row_size() ; r++)
-        mValue[r] += v[r];
-    return *this;
-}
-
-template <typename T>
-template <typename U>
-tmat44<T>& tmat44<T>::operator -= (const tmat44<U>& v) {
-    for (size_t r=0 ; r<row_size() ; r++)
-        mValue[r] -= v[r];
-    return *this;
-}
-
-template <typename T>
-template <typename U>
-tmat44<T>& tmat44<T>::operator *= (U v) {
-    for (size_t r=0 ; r<row_size() ; r++)
-        mValue[r] *= v;
-    return *this;
-}
-
-template <typename T>
-template <typename U>
-tmat44<T>& tmat44<T>::operator /= (U v) {
-    for (size_t r=0 ; r<row_size() ; r++)
-        mValue[r] /= v;
-    return *this;
-}
-
-// ----------------------------------------------------------------------------------------
 // Arithmetic operators outside of class
 // ----------------------------------------------------------------------------------------
 
@@ -367,24 +336,6 @@
  * it determines the output type (only relevant when T != U).
  */
 
-// matrix + matrix, result is a matrix of the same type than the lhs matrix
-template <typename T, typename U>
-tmat44<T> PURE operator +(const tmat44<T>& lhs, const tmat44<U>& rhs) {
-    tmat44<T> result(tmat44<T>::NO_INIT);
-    for (size_t r=0 ; r<tmat44<T>::row_size() ; r++)
-        result[r] = lhs[r] + rhs[r];
-    return result;
-}
-
-// matrix - matrix, result is a matrix of the same type than the lhs matrix
-template <typename T, typename U>
-tmat44<T> PURE operator -(const tmat44<T>& lhs, const tmat44<U>& rhs) {
-    tmat44<T> result(tmat44<T>::NO_INIT);
-    for (size_t r=0 ; r<tmat44<T>::row_size() ; r++)
-        result[r] = lhs[r] - rhs[r];
-    return result;
-}
-
 // matrix * vector, result is a vector of the same type than the input vector
 template <typename T, typename U>
 typename tmat44<U>::col_type PURE operator *(const tmat44<T>& lv, const tvec4<U>& rv) {
@@ -421,47 +372,17 @@
     return result;
 }
 
-// matrix * matrix, result is a matrix of the same type than the lhs matrix
-template <typename T, typename U>
-tmat44<T> PURE operator *(const tmat44<T>& lhs, const tmat44<U>& rhs) {
-    return matrix::multiply< tmat44<T> >(lhs, rhs);
-}
-
-// ----------------------------------------------------------------------------------------
-// Functions
 // ----------------------------------------------------------------------------------------
 
-// inverse a matrix
-template <typename T>
-tmat44<T> PURE inverse(const tmat44<T>& m) {
-    return matrix::inverse(m);
-}
-
-template <typename T>
-tmat44<T> PURE transpose(const tmat44<T>& m) {
-    return matrix::transpose(m);
-}
-
-template <typename T>
-T PURE trace(const tmat44<T>& m) {
-    return matrix::trace(m);
-}
-
-template <typename T>
-tvec4<T> PURE diag(const tmat44<T>& m) {
+/* FIXME: this should go into TMatSquareFunctions<> but for some reason
+ * BASE<T>::col_type is not accessible from there (???)
+ */
+template<typename T>
+typename tmat44<T>::col_type PURE diag(const tmat44<T>& m) {
     return matrix::diag(m);
 }
 
 // ----------------------------------------------------------------------------------------
-// Debugging
-// ----------------------------------------------------------------------------------------
-
-template <typename T>
-String8 tmat44<T>::asString() const {
-    return matrix::asString(*this);
-}
-
-// ----------------------------------------------------------------------------------------
 
 typedef tmat44<float> mat4;
 
