little refactoring and bug removal

Removed GetLocalTransform bug
Some code refactoring