Fully working version. Fixed bug in calculation of the fscore.