looking for id of collapsed node and subdividing a hex should be separated to improve modularity and readability.