Moved extraction steps into module