cleaned code for configure page
added loading gif while page loads