Reworked the code. Part of my ongoing quest to reduce the overhead of my module.