Minor memory optimization to observer pattern