fixed cropLayer masking and some reformatting