Moved most events to Lua instead. The cause of this is to reduce the amount of updates for the actual program.