layers almost working 100%, need to play with numbers for persisting layers to db