Updated version pulled from codeKata, added comments and use strict