store element sizes in a table
use static initialization
initial work into splitting elf stuff out

Note to self: kill the externs, put in a proper API