run of code through tidyR

fixes all my poor practices. A couple of bad line end choices however