Updated with java memory and fixes for production