Refactored codes for SimpleDBI.php