made this compilable by g++ and fixed undefined virtual functions

Hey, Deven asked me to help you guys out so I did this.

You can compile this in g++ on linux just by running the make file. Feel free to delete it, I just didn't have Visual Studio. 

Good Luck,