Minor refactor of parser; made the code more consistent by consistent useage of functions (most notably using <$> instead of fmap more consistently).