In my opinion, instead of working on features it'd be a better idea to work on your optimization, so that down the line you don't have to spend a lot of time optimizing old code.
Right now you're repeating a ton of tickly @e checks which is not good at all for performance. Instead, you can just do the @e check once and have it lead to a function that runs everything that you were checking for before.
Also, you may want to cut down on NBT checks by using predicates instead of nbt={} to check for the player's held item. NBT checks are very inefficient and get worse as the player's inventory gets more data; if you have a large book such as TCC's Compendium one NBT check can cost you upwards of 5 mspt per player.