More cleanup based on http://appendto.com/2010/10/how-good-c-habits-can-encourage-bad-javascript-habits-part-2/