Added in more events to catch and also catch any errors so it doesn't crash the client.