Added custom layer support