Added a new function "loadingAnimation"

and minor bug fixed (remove empty pline).