API checking and setting layer as its own attribute.