Added event managment and some unknown features and bug fixes