sorted out issues with pointer casting, avoiding a memcpy
removed quotes from class labels
tidied Makefile
added some debug-mode output
fixed a bug where parameters from the internal model were still being used when an external model was loaded