Fixed some minor issues and added events
Fixed some minor issues and added events