Undo old solution and replace with more efficient solution

TODO: Switch from using "enabled" to having a "state" variable and also
clean up other areas of the code