I had to refactor the existing add_interface_block as it was getting extremely large. Now it's all split up into different readable functions.