Renaming initialize method to constructor, so it will be more compatible with javascript api