Regarding the crashing:
Try renaming the variable smith in main.cpp to some other name. Using the class name causes crashes at times.