clean imports and fix local dir variable name