Reverting class and method visibility in layer impl and fixing of test
cases for layers