Checking that this structure looks generally ok -- going to sub in logic where the TODO comment is then add a test.