Added database class, little core update.