Cleaned up the directories and split up R scripts for clarity.