Database class updated and class renamed

messages.class.php to message.class.php and updated database.class.php