database record more about source, and some small changes
use CAPITALIZED characters for sqlite commands
update outdated docstrings
use different names in different scopes
follow PEP-8