Reorganise imports and change gitignore settings for IDEA.