use real hashtable for mapping nodes
user vector for sequences and documents
remove use of restrict keyword