script now works, has a few bugs that need to be fixed
Fixed bug - checkbox no longer available outside posemode
final refactoring