Compilation errors

Was just messing around with this on Ubuntu 14.4, and had to make these tweaks to get it compiling (still get a segfault when I try to run it though).