replace tabs with spaces, add missing imports