Replaced glm dependency with lighter and more maintainable linmath.