bugfix: border check in Skeletonize should use '== 0', not '<= 0'
refactored code in Skeletonize
made temporary array in Skeletonize a class member