Added stack pop method
Moved to using "Doc" model for RD manipulation