Refactored the loader out
Add sample R script