bug fix: layers array private, use contexts object