added some section headers and rearranged the commands
adding "return(invisible())" to the curve_it function has started to improve things
wrapped lapply in "invisible" to quiet the output