layers and masks, in progress
layers still not working properliye
pulled from master (after hols)
fixed merge errors and compiler errors