fixed a few typos and removed unnecessary code.
Added linalg import back.
Merge pull request #1865 from caglar/fix_typos

fixed a few typos and removed unnecessary code.