Finalized changes to be made outside of main function R file