ran tidy_dir from the formatR package to clean up code.