Added database life cycle methods
Refactored factory methods to create PDO database adapter
More tests