Cleaned up R code. Added sample images