fixes compilation errors

I don't know if you have future plans for this repo but I wanted to test the usability of the code so I fixed some "legacy" code along the way.