ADDED gneeric load(); moved around code

load() detects filetype and uses correct function via some inspection.
Perhaps better is to include some kind of module level registration
where one can add a function e.g. loadpxp and associate a default
filetype with it, which load() then uses automatically.
May want to reduce strictness of data type checking in future; added constant TYPE_CHECKING