Added a static function removeInstance to clear out cached database instances. This might be causing PDO to retain db connections, causing problems.