using a weak hashmap for memoisation
fixed the warnings in the build file
added some reset to nodes in input channels to try to avoid OOMEs