defined wants a string as input

fix #92
variables name typo
fix typo in comment

close #102
Changing inner join to outer join

Using OUTER JOIN instead of INNER JOIN removes all entry in mtalog in given time interval also if there isn't a correlation in mtalog_ids.

close #99
adding optimize table on mtalog_ids
Merge pull request #96 from philrandal/master

Fix issue #95