Seperated the main ELF editor code from its main() function