Applied code formatting styles from: http://nodeguide.com/style.html.
- ignored the 80 char line length
- still need to implement more early returns. i.e if (err)