minor fixes (type annotations, global object)