* queryable_variables_get_date() didnt return a date because no date was being entered. This is now fixed.
* When a value was null, the variable was not entered into the DB because the type function couldnt figure out what type to set it as. Simply initializing the variable with '' fixes this. Fixed.
* jid and sid had their indexes set to tid.. This is now fixed.