Changed DB-accessors to use prepared statements.