Tidy code for basic examples on NodeJS