Removed events and fixed bugs.