Take out first two anon functions
Stupid mistake
Merge pull request #6 from streetlight/master

Abstract first two anon functions