Added loading gif.
Code cleanup
loading gif