Namespace javascript and add init() method.