Added clear function to Layer