CJ's First pull request for review

First pull request for review.
Do not write to stdout. Use Rails' logger if you want to log.