Change all plyr functions to dplyr, remove dependency on plyr, add dependency on dplyr