Rework the abstract Loader class

Move the source code of the template to the header file.
Fix an error with the delete function of the shared_ptr.
Remove the source file.