Cleanup BytecodeLoader

This PR cleanup the code in loader.c