Inital port from linux.  (Still need to set up closure)
Set up closure.