Fixed compiler errors

Closes https://github.com/PistonDevelopers/piston/issues/308
Closes https://github.com/PistonDevelopers/piston/issues/309
Closes https://github.com/PistonDevelopers/piston/issues/310