remove ids_manager and add elements_manager and refactoring