Re-worked Matrix code, more testing and refactoring. Removed DOM realted classes that won't be needed.