Consolidated the writing of the command delegates to share some code.
Fixing issue #5:
- Added try/catch around all function loading in LoadAllFunctions to give a good error if a function pointer fails to load.
- Added more advanced error checking in LoadFunction because there are more places it can go wrong and this way users have more info on where to look.