Add allowed_layer_constraints and unit_tests.
unit_for_layer API and test.
Fix typo :)'
categories_for_layer API and test.
subcategories_for_layer API and test.