Removes unreachable code
Remove unused imports and default templates