[140819] Move the function of addObject to class Controller, making all objects added to JS environment becoming properties of class Controller.