Merge Matt's recent changes
Fixed unittest speed
Merge linear operator in and fixed back-compatibliity