added Type annotations to class fields that need it; fixed js; fixed readme