Cleared up Matrix class code