Changed API attribute name, added document ref to function literal