How to know/ figure out what functions I need (Search & replace names)

Hi Peter,
I am not currently at home, so could not check it instantly. Will get back in a couple of days.
Could you post the names of your layers?
If it makes difficult for you to manually type all layer names then run this script, and copy the result:

import rhinoscriptsyntax as rs
lyrnames = rs.LayerNames()
print lyrnames