blake: clean and optimize