tex mgr is now a singleton (I think), also fixes #4