fixed an error in probability calculation for determining language
some code cleanup
starting to print final results