Declare plugin functions and comment-out old implementation
Implement basic document functions