enhance JMS gadget - code cleaning