Made code nicer

Closes https://github.com/PistonDevelopers/rust-graphics/issues/518
Merge pull request #525 from bvssvni/master

Made code nicer