refactor for cleanliness
Merge branch 'master' into memoify