Added F measure calcuation part and some minor re org