Split files again, fleshed out enums, added matrix code with garbage collection.