Large refactor for sustainability

Layer class is now abstract; layers are added to container with
functions