Fixed issues to make NBs runnable.

These are various fixes I had to do in order to get the NBs running.