more last minute fixes: fixed severe memory leak, fixed bug in linked list, some minor optimizations
documentation update