Refactored layers so that they inherit from GenrealLayer