Refactored to use native DOM methods for adding of new elements