Small refactorings

Hey, just put together some small refactorings. 

You also might want to consider making your own `head` function instead of using prelude's.
Merge pull request #1 from Cipherwraith/patch-1

Small refactorings