code clean-up and format with imagej-style