Implemented the initialization of the training set from the database, removed commented out code
Changed storage classe on dbh_get_conn because it's called in other .c files and changed the return type for get_doc_cnt from double to int because that's what mongo_count actually returns
removed commented out code and misc updates
added the {w:1} options to database operations which do writing to notify the driver that a write operation is taking place
Added an element of denormalized data:

Added the 'keyword' field to the keywords' document schema so that it can be searched against in tools/prepare_training_set.js
First implementation of the algorithm for preparing the training set

It calculates the input_vector values and determines the expected_output value