ENH: separete constructor and function createLinks