worked on layers model and cleanup