Added tidy data set output
Polished code and added comments