Added JsDoc; removed some console output