Add static and dynamic, generalize matrix.