updated gitignore and consolidate the various Matrix objects into a
centralized module.