Fix incorrect variable name causing crash.
Remove a bunch of debug code that should no longer be needed.
Add functionality to automatically switch between NFS and HTTP depending on NBI requirements.