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.