Some random changes to make the plugin run faster.