Added anant-sogani's R solution and cleaned up file structure.