Functional updates

I was not able to get this code functional on a unicorn non-linux installation without these commits.