Implemented two layer template inheritance