Added PDO wrapper for better DB queries and parameterization.