Fixed typo in uninitialize function. 

Also, as a suggestion, put informative console.log statements in comment. (These come from the template)