Fixed some compiler errors

I've fixed some (but not all) of the compiler errors. I'm new to Rust, so I'm not sure how valid my fixes are.

Hopefully you find some time to fix the rest of the errors. I'm looking forward to using this library.