Move files specific to cystem into subdir. Add a bunch of test files, including a ported matrix library.