refactored Loader package with Unit Tests