cleaned up elf stuff a bit