Added database wrapper
Started work on event system