adding jvm memory settings, plus other small fixes
merge