clogit draft: work in some stuff and fixed some bugs.