Refactor dense linear algebra into a package.