Code refactorization on SkeletonFitting