Modified weight.h according to the feedback.
Modified tfidfweight.cc according to the feedback.
Modified api_weight.cc as per the feedback and added tests for changes to the scheme.