Refactor into a more functional style.
Merge branch 'master' into gh-pages

Conflicts:
	life.js