Refactor and add extractors to core