Tighten Database interface and created MySQLi interface for CLI and PHPUnit
Merge origin/master