Removed unused variables.
Added animation when loading and unloading images.