Added deadlock check to darwin.
Cleaned up some todo's.