added new BaseLayer, which Layer and FastLayer extend