Used string splitting and strip for cleaner code to detect variables. Also added a regex for variables when the dice are clicked, but there is nothing else there.