Memory

fixes #101 
Limits Java heap size, improvements to kue