sync up before 2/18 session

A lot of fixes and optimizations...