added BaseLayer and Layer class