refined settings, added JSDoc comments