Simplified layer templates; added default security group to java-stack.template