singletonified the Matrix types, simplified A LOT of code. Probably means GHC 7.4 wont work, but the code is better now

Signed-off-by: Carter Tazio Schonwald <carter.schonwald@gmail.com>