Refactor into scanELF