add faster code for better performance.

According to [http://jsperf.com/innerhtml-vs-removechild] removeChild has a faster execution time then innerHTML.