Tempfiles work

My branch seems to be in an odd state.  

Please commit only my last three commits made on Jan 17th.

28b819dfbc3bf6abef2c6b6002932ef59b986930
e246a2cae3b43984bf61d93ab7b6ee1bc54f263c
5546b828462a5ee8f7bbab32a56a28f17314cfb0