Fence gates fixed and remove unused imports