Bug fixes, fully rewrited algorithm of shuffling puzzle