Added rice coding, avg prediction, function calls in main