Made improvements based upon Douglas Crockford talks.