Improvement CodeRefactor

- Truncate Imports for haxe
- fixed behavior for one unused import.

Is this should be in try/finally?