Added a module system, and transition to PDO