Remove entity typeloader

I have distilled the changes required to the following five commits.