Added Documents array functions and fixed require paths