[fix] Code repetition removed.
[fix] Code repetition removed in render text.
[fix] Duplicated code removed.
[fix] Trailing whitespaces removed.