[Js] Optimize code
[Java] Implements ClientComponent