code cleaning
Top/bottom-hat filtering added