Created Main class, events and commands.